package com.haohao.system.service.impl;

import java.util.List;
import com.haohao.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haohao.system.mapper.SysLogisticsMapper;
import com.haohao.system.domain.SysLogistics;
import com.haohao.system.service.ISysLogisticsService;

/**
 * 物流配送Service业务层处理
 * 
 * @author haohao
 * @date 2024-04-12
 */
@Service
public class SysLogisticsServiceImpl implements ISysLogisticsService 
{
    @Autowired
    private SysLogisticsMapper sysLogisticsMapper;

    /**
     * 查询物流配送
     * 
     * @param id 物流配送主键
     * @return 物流配送
     */
    @Override
    public SysLogistics selectSysLogisticsById(Long id)
    {
        return sysLogisticsMapper.selectSysLogisticsById(id);
    }

    /**
     * 查询物流配送列表
     * 
     * @param sysLogistics 物流配送
     * @return 物流配送
     */
    @Override
    public List<SysLogistics> selectSysLogisticsList(SysLogistics sysLogistics)
    {
        return sysLogisticsMapper.selectSysLogisticsList(sysLogistics);
    }

    /**
     * 新增物流配送
     * 
     * @param sysLogistics 物流配送
     * @return 结果
     */
    @Override
    public int insertSysLogistics(SysLogistics sysLogistics)
    {
        sysLogistics.setCreateTime(DateUtils.getNowDate());
        return sysLogisticsMapper.insertSysLogistics(sysLogistics);
    }

    /**
     * 修改物流配送
     * 
     * @param sysLogistics 物流配送
     * @return 结果
     */
    @Override
    public int updateSysLogistics(SysLogistics sysLogistics)
    {
        return sysLogisticsMapper.updateSysLogistics(sysLogistics);
    }

    /**
     * 批量删除物流配送
     * 
     * @param ids 需要删除的物流配送主键
     * @return 结果
     */
    @Override
    public int deleteSysLogisticsByIds(Long[] ids)
    {
        return sysLogisticsMapper.deleteSysLogisticsByIds(ids);
    }

    /**
     * 删除物流配送信息
     * 
     * @param id 物流配送主键
     * @return 结果
     */
    @Override
    public int deleteSysLogisticsById(Long id)
    {
        return sysLogisticsMapper.deleteSysLogisticsById(id);
    }
}
